package org.example.service;

import org.example.dao.UserDAOImpl;
import org.example.entity.User;

import java.util.List;

/**
 * 用户业务逻辑实现类
 */
public class UserServiceImpl implements UserService{
    private UserDAOImpl userDAO = new UserDAOImpl();

    /**
     * 查询用户
     * @param user
     * @return
     */
    @Override
    public User queryOne(User user) {
        return userDAO.selectOne(user);
    }

    @Override
    public List<User> selectAll() {
        return null;
    }

    /**
     * 添加用户
     * @param user
     * @return
     */
    @Override
    public int addUser(User user) {
        return userDAO.insertUser(user);
    }

    @Override
    public int editUser(User user) {
        return 0;
    }

    @Override
    public int removeUser(User user) {
        return 0;
    }
}
